Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Cashfree Payment Gateway SDK from Python to TypeScript/JavaScript, transitioning from version 2023-08-01 to 2025-01-01. The changes involve a complete language migration where Python model files (using Pydantic) are replaced with TypeScript interface definitions.
Changes:
- Complete language migration from Python to TypeScript/JavaScript
- API version update from 2023-08-01 to 2025-01-01
- Conversion of Pydantic models to TypeScript interfaces
- Type system changes from Python types to TypeScript/JavaScript types
Reviewed changes
Copilot reviewed 132 out of 949 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| fetch_settlements_request_filters.py | Python model replaced with TypeScript interface; type annotations changed from Python to TS syntax |
| fetch_settlements_request.py | Python model replaced with TypeScript interface |
| fetch_recon_request_pagination.py | Python model replaced with TypeScript interface |
| fetch_recon_request_filters.py | Python model replaced with TypeScript interface |
| fetch_recon_request.py | Python model replaced with TypeScript interface |
| extended_customer_details.py | Python model replaced with TypeScript interface; removed validation constraints |
| extended_cart_details.py | Python model replaced with TypeScript interface |
| evidences_to_contest_dispute.py | Python model replaced with TypeScript interface |
| evidence_submitted_to_contest_dispute.py | File deleted (Python model removed) |
| evidence.py | Python model replaced with TypeScript interface |
| es_order_recon_response_data_inner_order_splits_inner_split_inner.py | Python model replaced with TypeScript interface |
| es_order_recon_response_data_inner_order_splits_inner.py | Python model replaced with TypeScript interface |
| es_order_recon_response_data_inner.py | Python model replaced with TypeScript interface; added new 'status' field |
| es_order_recon_response.py | Python model replaced with TypeScript interface |
| disputes_entity.py | Python model replaced with TypeScript interface; added 'dispute_amount_currency' field; enum handling updated |
| dispute_evidence_inner.py | New TypeScript interface file added |
| create_subscription_payment_request_enach.py | Python model replaced with TypeScript interface; file recreated with alphabetically sorted fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * @type {List[str]} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'cf_settlement_ids'?: List[str]; | ||
| /** | ||
| * List of settlement UTRs for which you want the settlement reconciliation details. | ||
| * @type {List[str]} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'settlement_utrs'?: List[str]; | ||
| /** | ||
| * Specify the start date from when you want the settlement reconciliation details. | ||
| * @type {str} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'start_date'?: str; | ||
| /** | ||
| * Specify the end date till when you want the settlement reconciliation details. | ||
| * @type {str} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'end_date'?: str; |
There was a problem hiding this comment.
TypeScript syntax error: List[str] is Python syntax. In TypeScript, array types should be declared as string[] or Array<string>.
| * @type {List[str]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'cf_settlement_ids'?: List[str]; | |
| /** | |
| * List of settlement UTRs for which you want the settlement reconciliation details. | |
| * @type {List[str]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'settlement_utrs'?: List[str]; | |
| /** | |
| * Specify the start date from when you want the settlement reconciliation details. | |
| * @type {str} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'start_date'?: str; | |
| /** | |
| * Specify the end date till when you want the settlement reconciliation details. | |
| * @type {str} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'end_date'?: str; | |
| * @type {string[]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'cf_settlement_ids'?: string[]; | |
| /** | |
| * List of settlement UTRs for which you want the settlement reconciliation details. | |
| * @type {string[]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'settlement_utrs'?: string[]; | |
| /** | |
| * Specify the start date from when you want the settlement reconciliation details. | |
| * @type {string} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'start_date'?: string; | |
| /** | |
| * Specify the end date till when you want the settlement reconciliation details. | |
| * @type {string} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'end_date'?: string; |
| * @type {List[str]} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'cf_settlement_ids'?: List[str]; | ||
| /** | ||
| * List of settlement UTRs for which you want the settlement reconciliation details. | ||
| * @type {List[str]} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'settlement_utrs'?: List[str]; | ||
| /** | ||
| * Specify the start date from when you want the settlement reconciliation details. | ||
| * @type {str} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'start_date'?: str; | ||
| /** | ||
| * Specify the end date till when you want the settlement reconciliation details. | ||
| * @type {str} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'end_date'?: str; |
There was a problem hiding this comment.
TypeScript syntax error: List[str] is Python syntax. In TypeScript, array types should be declared as string[] or Array<string>.
| * @type {List[str]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'cf_settlement_ids'?: List[str]; | |
| /** | |
| * List of settlement UTRs for which you want the settlement reconciliation details. | |
| * @type {List[str]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'settlement_utrs'?: List[str]; | |
| /** | |
| * Specify the start date from when you want the settlement reconciliation details. | |
| * @type {str} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'start_date'?: str; | |
| /** | |
| * Specify the end date till when you want the settlement reconciliation details. | |
| * @type {str} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'end_date'?: str; | |
| * @type {string[]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'cf_settlement_ids'?: string[]; | |
| /** | |
| * List of settlement UTRs for which you want the settlement reconciliation details. | |
| * @type {string[]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'settlement_utrs'?: string[]; | |
| /** | |
| * Specify the start date from when you want the settlement reconciliation details. | |
| * @type {string} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'start_date'?: string; | |
| /** | |
| * Specify the end date till when you want the settlement reconciliation details. | |
| * @type {string} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'end_date'?: string; |
| * @type {List[str]} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'cf_settlement_ids'?: List[str]; | ||
| /** | ||
| * List of settlement UTRs for which you want the settlement reconciliation details. | ||
| * @type {List[str]} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'settlement_utrs'?: List[str]; | ||
| /** | ||
| * Specify the start date from when you want the settlement reconciliation details. | ||
| * @type {str} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'start_date'?: str; | ||
| /** | ||
| * Specify the end date till when you want the settlement reconciliation details. | ||
| * @type {str} | ||
| * @memberof FetchSettlementsRequestFilters | ||
| */ | ||
| 'end_date'?: str; |
There was a problem hiding this comment.
TypeScript syntax error: str is Python syntax. In TypeScript, string types should be declared as string.
| * @type {List[str]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'cf_settlement_ids'?: List[str]; | |
| /** | |
| * List of settlement UTRs for which you want the settlement reconciliation details. | |
| * @type {List[str]} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'settlement_utrs'?: List[str]; | |
| /** | |
| * Specify the start date from when you want the settlement reconciliation details. | |
| * @type {str} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'start_date'?: str; | |
| /** | |
| * Specify the end date till when you want the settlement reconciliation details. | |
| * @type {str} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'end_date'?: str; | |
| * @type {Array<string>} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'cf_settlement_ids'?: Array<string>; | |
| /** | |
| * List of settlement UTRs for which you want the settlement reconciliation details. | |
| * @type {Array<string>} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'settlement_utrs'?: Array<string>; | |
| /** | |
| * Specify the start date from when you want the settlement reconciliation details. | |
| * @type {string} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'start_date'?: string; | |
| /** | |
| * Specify the end date till when you want the settlement reconciliation details. | |
| * @type {string} | |
| * @memberof FetchSettlementsRequestFilters | |
| */ | |
| 'end_date'?: string; |
| * @type {int} | ||
| * @memberof FetchReconRequestPagination | ||
| */ | ||
| 'limit': int; | ||
| /** | ||
| * Specifies from where the next set of settlement details should be fetched. | ||
| * @type {str} | ||
| * @memberof FetchReconRequestPagination | ||
| */ | ||
| 'cursor'?: str; |
There was a problem hiding this comment.
TypeScript syntax error: int is Python syntax. In TypeScript, integer types should be declared as number.
| * @type {int} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'limit': int; | |
| /** | |
| * Specifies from where the next set of settlement details should be fetched. | |
| * @type {str} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'cursor'?: str; | |
| * @type {number} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'limit': number; | |
| /** | |
| * Specifies from where the next set of settlement details should be fetched. | |
| * @type {string} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'cursor'?: string; |
| * @type {int} | ||
| * @memberof FetchReconRequestPagination | ||
| */ | ||
| 'limit': int; | ||
| /** | ||
| * Specifies from where the next set of settlement details should be fetched. | ||
| * @type {str} | ||
| * @memberof FetchReconRequestPagination | ||
| */ | ||
| 'cursor'?: str; |
There was a problem hiding this comment.
TypeScript syntax error: str is Python syntax. In TypeScript, string types should be declared as string.
| * @type {int} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'limit': int; | |
| /** | |
| * Specifies from where the next set of settlement details should be fetched. | |
| * @type {str} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'cursor'?: str; | |
| * @type {number} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'limit': number; | |
| /** | |
| * Specifies from where the next set of settlement details should be fetched. | |
| * @type {string} | |
| * @memberof FetchReconRequestPagination | |
| */ | |
| 'cursor'?: string; |
| * @type {float} | ||
| * @memberof ESOrderReconResponseDataInner | ||
| */ | ||
| 'amount'?: float; |
There was a problem hiding this comment.
TypeScript syntax error: float is Python syntax. In TypeScript, floating-point number types should be declared as number.
| * @type {float} | |
| * @memberof ESOrderReconResponseDataInner | |
| */ | |
| 'amount'?: float; | |
| * @type {number} | |
| * @memberof ESOrderReconResponseDataInner | |
| */ | |
| 'amount'?: number; |
| * @type {int} | ||
| * @memberof ESOrderReconResponse | ||
| */ | ||
| 'limit'?: int; |
There was a problem hiding this comment.
TypeScript syntax error: int is Python syntax. In TypeScript, integer types should be declared as number.
| * @type {int} | |
| * @memberof ESOrderReconResponse | |
| */ | |
| 'limit'?: int; | |
| * @type {number} | |
| * @memberof ESOrderReconResponse | |
| */ | |
| 'limit'?: number; |
| * @type {List[PreferredEvidenceInner]} | ||
| * @memberof DisputesEntity | ||
| */ | ||
| 'preferred_evidence'?: List[PreferredEvidenceInner]; | ||
| /** | ||
| * | ||
| * @type {List[DisputeEvidenceInner]} | ||
| * @memberof DisputesEntity | ||
| */ | ||
| 'dispute_evidence'?: List[DisputeEvidenceInner]; |
There was a problem hiding this comment.
TypeScript syntax error in JSDoc comment: List[PreferredEvidenceInner] uses Python syntax. Should be Array<PreferredEvidenceInner> or PreferredEvidenceInner[].
| * @type {List[PreferredEvidenceInner]} | |
| * @memberof DisputesEntity | |
| */ | |
| 'preferred_evidence'?: List[PreferredEvidenceInner]; | |
| /** | |
| * | |
| * @type {List[DisputeEvidenceInner]} | |
| * @memberof DisputesEntity | |
| */ | |
| 'dispute_evidence'?: List[DisputeEvidenceInner]; | |
| * @type {Array<PreferredEvidenceInner>} | |
| * @memberof DisputesEntity | |
| */ | |
| 'preferred_evidence'?: Array<PreferredEvidenceInner>; | |
| /** | |
| * | |
| * @type {Array<DisputeEvidenceInner>} | |
| * @memberof DisputesEntity | |
| */ | |
| 'dispute_evidence'?: Array<DisputeEvidenceInner>; |
| * @type {float} | ||
| * @memberof CreateSubscriptionRefundRequest | ||
| */ | ||
| 'cf_payment_id'?: float; |
There was a problem hiding this comment.
Type mismatch: cf_payment_id is described as "Cashfree subscription payment reference number" which should be a string identifier, not a float. This field was StrictStr in the original Python code.
| * @type {float} | |
| * @memberof CreateSubscriptionRefundRequest | |
| */ | |
| 'cf_payment_id'?: float; | |
| * @type {str} | |
| * @memberof CreateSubscriptionRefundRequest | |
| */ | |
| 'cf_payment_id'?: str; |
| * @type {float} | ||
| * @memberof CreateVendorResponse | ||
| */ | ||
| 'phone'?: float; |
There was a problem hiding this comment.
Type mismatch: phone numbers should be strings, not floats. This could lead to precision issues and loss of leading zeros. The original Python code used Union[StrictFloat, StrictInt] which is also questionable, but in TypeScript this should be string.
| * @type {float} | |
| * @memberof CreateVendorResponse | |
| */ | |
| 'phone'?: float; | |
| * @type {str} | |
| * @memberof CreateVendorResponse | |
| */ | |
| 'phone'?: str; |
Raising PR to github